<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Yii::$app->name;?> 后台管理</title>
<?php $this->HeaderView(['datetimepicker','ueditor', 'webuploader']);
?>
</head>
<body class="view_form" id="view_form_Auction">
                    
 <form id="view-form-form" class="view-form-form" method="post" action="<?= $this->formUrl($model);?>" enctype="multipart/form-data">
        <input type="hidden" id="id" name="Forum[forumid]" value="<?php echo $model->forumid;?>">
            <table class="view-form-input" border="0" cellspacing="0" cellpadding="0" width="100%">
                <thead>
                    <tr>
                        <th valign="top" class="td-title"><label for="catid"><font class="required">*</font>版块名：</label></th>
                        <td class="td-input">
                          <input type="text" class="input-text" id="name" name="Forum[name]" value="<?php echo $model->name;?>">
                        </td>
                    </tr>
                    <tr>
                        <th valign="top" class="td-title"><label for="catid"><font class="required">*</font>缩略图：</label></th>
                         <td  class="td-input" valign="top">
                       						<?php
echo \submodule\widgets\SubmoduleWidget::widget(['viewPath'=>'image', 'options' => [
'id'=> 'icon',
'name'=> 'Forum[icon]',
'attributes'=> array_merge($model->attributes, array('id'=>$model->forumid)),
'model'=> $model,
'param'=> []
]]);
?>
                     </td>   
                    </tr>
                     <tr>
                        <th valign="top" class="td-title"><label for="catid"><font class="required">*</font>描述：</label></th>
                        <td class="td-umeditor td-input"><textarea class="textarea-text" type="text" id="content" name="Forum[intro]" style="width:50%; height:200px;"><?php echo $model->intro;?></textarea>
                        </td>
                    </tr>
                      <tr>
                        <th></th>
                        <td><br>
                        <button class="ui-btn ui-btn-primary" type="submit">提交</button>
                            </td>
                    </tr>
                        </tbody>
            </table>
<?= $this->csrfToken()?>
 <input type="hidden" class="input-text" id="time" name="Forum[datetime]" value="<?php echo time();?>">   
    
        
    </form>
<script type="text/javascript">
$(function(){
	//需要表单验证的请在这里配置，文档
	$("#view-form-form").validate({
		//debug:true, //如果只调试验证不提交数据，可开启这里
		rules: {
			'Forum[name]':{
				required:true,
				maxlength:50
			},
			'Forum[intro]':{
				required:true,
				maxlength:300
			},
		},
		messages: {
			'Forum[name]':{
				required:'请输入版块标题',
				maxlength:'标题长度不多于35个字符'
			},
			'Forum[intro]':{
				required:'请输入版块介绍',
				maxlength:'最大输入字数为300'
			},      
		},     
	});
});
</script>
<?php $this->FooterView();?>
</body>
</html>